﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="manageGold.aspx.cs" Inherits="admin_gold_manageGold" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/table.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .main
        {
            margin-left:50px;
            margin-top:30px;
            width: 860px;
            height: 100%;
            background-color: #FFFFFF;
            border: 0;
        }
        .left
        {
            margin-left: 10px;
            margin-top: 20px;
            width: 220px;
            float: left;
            background-color: #ffffff;
        }
        .rigth
        {
            margin-left: 10px;
            margin-top: 30px;
            width: 600px;
            background-color: #ffffff;
            float: left;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function openWin(u, w, h) {
            var l = (screen.width - w) / 2;
            var t = (screen.height - h) / 2;
            var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l;
            s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no';
            window.open(u, 'oWin', s);      
            } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="left">
            出售情况：<br />
            <asp:RadioButton ID="rbtn_all" runat="server" GroupName="sell" Text="全部" 
                Checked="True" />
            <asp:RadioButton ID="rbtn_yes" runat="server" GroupName="sell" Text="已出售" />
            <asp:RadioButton ID="rbtn_no" runat="server" GroupName="sell" Text="未出售" />
            <br />
            <hr />
            使用情况：<br />
            <asp:RadioButton ID="rbtn_u_all" runat="server" GroupName="use" Text="全部" 
                Checked="True" />
            <asp:RadioButton ID="rbtn_u_y" runat="server" GroupName="use" Text="已使用" />
            <asp:RadioButton ID="rbtn_u_n" runat="server" GroupName="use" Text="未使用" />
            <br />
            <hr />
            金币值：
            <asp:DropDownList ID="ddl_gold" runat="server">
                <asp:ListItem>请选择金币值</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>30</asp:ListItem>
                <asp:ListItem>50</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:Button ID="btn_search" runat="server" Text="查询" 
                onclick="btn_search_Click" />
            <br />
        </div>
        <div class="rigth">
            <table align="center" id="Tab" class="tab">
                <tr>
                    <th width="30">
                        
                    </th>
                    <th width="160">
                        卡号
                    </th>
                    <th width="100">
                        密码
                    </th>
                    <th width="60">
                        金币值
                    </th>
                    <th width="100">
                        出售情况
                    </th>
                    <th width="100">使用情况</th>
                    <th width="100">出售</th>
                </tr>
                <asp:Repeater Id="goldList" runat="server">
                    <ItemTemplate>
                        <tr style='background-color: <%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'
                            onmouseover="this.style.background='#ddeeff'" onmouseout="this.style.background='<%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'">
                            <td>
                                    <%# DataBinder.Eval(Container.DataItem, "num")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "goldcardid")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "pwd")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "gold")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "status_sell").ToString().Equals("1")?"已出售":"未出售"%>
                            </td>
                            <td>
                            <%# DataBinder.Eval(Container.DataItem, "status_use").ToString().Equals("1")?"已使用":"未使用"%>
                                <td>
                                <%# DataBinder.Eval(Container.DataItem, "status_sell").ToString().Equals("1") ? "---" : "<a href=\"javascript:void(openWin('sellGold.aspx?id=" + DataBinder.Eval(Container.DataItem, "goldcardid") + "',400,200));\">出售</a>"%>
                            </td>
                        </td>
                        
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        <br />
        <div align="center">
            [页次:<asp:Label ID="nowPage" runat="server" Font-Bold="True"></asp:Label>/<asp:Label
                ID="allPages" runat="server" Font-Bold="True" ForeColor="#C00000"></asp:Label>]
            [共<asp:Label ID="allMsg" runat="server" Font-Bold="True"></asp:Label>条
            <asp:Label ID="onePage" runat="server" Font-Bold="True"></asp:Label>条/页] [<asp:HyperLink
                ID="firstPage" runat="server">首页</asp:HyperLink>] [<asp:HyperLink 
                ID="prePage" runat="server" >上一页</asp:HyperLink>]
            [<asp:HyperLink ID="nextPage" runat="server">下一页</asp:HyperLink>] [<asp:HyperLink
                ID="endPage" runat="server" >尾页</asp:HyperLink>]
        </div>
        </div>
    </div>
    </form>
</body>
</html>
